import java.util.function.Function;

public class Test {
    Inner inner;

    Test() {
        this.inner = new Inner();
    }

    class Inner {
        public Inner() {
            System.out.println("inner");
        }

        private int i = 1;
    }

    public static void main(String[] args) {
        MathOperation subtraction = (a, b) -> a - b;
        int res = subtraction.operation(1, 2);
        System.out.println(res);
        Test test = new Test();
        int i = test.inner.i;
        System.out.println(i);

        Function<Integer, String> fun = new Function<Integer, String>() {
            @Override
            public String apply(Integer t) {
                return String.valueOf(t);
            }
        };
        System.out.println(fun.apply(12));
    }

}
//生成navicat导入json
public void getRemoteQlsData() throws IOException {
        QualityServiceImpl qualityService = new QualityServiceImpl();
        CarCollectionPoints remoteCarPoints = qualityService.getRemoteCarPoints("http://10.28.32.145/CommonWebService.asmx", "", "2019-09-18 08:00:00", "2019-09-28 07:59:59");
        CarConcerns remoteCarConcerns = qualityService.getRemoteCarConcerns("http://10.28.32.145/CommonWebService.asmx", "", "2019-09-18 08:00:00", "2019-09-28 07:59:59");
        JSONObject.DEFFAULT_DATE_FORMAT = "dd/MM/yyyy HH:mm:ss";

        NameFilter filter = new NameFilter() {
            @Override
            public String process(Object object, String name, Object value) {
                return name.toUpperCase();
            }
        };

        if (remoteCarPoints != null) {
            String json = JSONObject.toJSONString(remoteCarPoints, filter, SerializerFeature.PrettyFormat, SerializerFeature.WriteDateUseDateFormat);
            BufferedOutputStream out = FileUtil.getOutputStream("d:/remoteCarPoints.json");
            out.write(json.getBytes());
            out.close();
        }
        if (remoteCarConcerns != null) {
            String json = JSONObject.toJSONString(remoteCarConcerns, filter, SerializerFeature.PrettyFormat, SerializerFeature.WriteDateUseDateFormat);
            BufferedOutputStream out = FileUtil.getOutputStream("d:/remoteCarConcerns.json");
            out.write(json.getBytes());
            out.close();
        }

    }

interface MathOperation {
    int operation(int a, int b);

    default void say() {
        System.out.println("hello");
    };

    static void run() {
        System.out.println("run");
    }
}
